1. Field of the Invention
This present invention concerns a method for the compression of intermediate object code by semantic analysis, usable in particular, but not exclusively, for the compacting of programs in executable intermediate object code in an embedded system with scarce hardware resources, such as a smartcard or such as a payment terminal with a microprocessor and a hardware and software environment which includes the following in particular:                a compiler which is used to obtain the intermediate object code from a source program, and        an interpreter which effects a software interpretation of the standard instructions of the intermediate object code into instructions which are executable directly by the microprocessor.        
2. Description of the Prior Art
In general, it is known that, in contrast to syntactic analysis, semantic analysis is a set of techniques which are used to extract the properties concerning the execution of a program. This technique, which depends on well-known theoretical foundations [CC77] “Patrick Cousot & Radhia Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or interpretation of fixpoints. In Conference Record of the Fourth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 238-252, Los Angeles, Calif., 1977. ACM Press, New York, N.Y., USA”, consists of constructing a mathematical model of program execution in the form of equations, known as semantic equations, and to apply algorithms for the automatic solution of these equations, enabling the desired information to be extracted. The semantic analysis techniques can, for example, be used to calculate the variation intervals of the scalar variables of a program, information which is useful for verification purposes in order to predict errors concerning crossing the boundaries of tables. They can also be used to deduce the referenced objects (accessed or modified) at given program points.
Syntactic analysis, for its part, is a test of techniques which are used to extract properties concerning the syntax of a program. The syntactic analysis techniques allows us, for example, to detect repetitions of given instruction sequences in a program. Contrary to semantic analysis, syntactic analyses are not dependent on program execution models, and do not provide information of an operational nature.
It turns out that, at the present time, all of the existing techniques in the area of code compression are based upon syntactic analysis, where the object code is treated as raw data to be compressed, but the semantics of the program (or its execution model) do not enter into the compression method. Some of these methods, such as that described in patent FR 2 785 695, for example, are based upon the search for syntactic patterns in the code, and on a factorisation of these patterns.